#include <iostream>
#include <string>
using namespace std;

int maxLength = 0;

int *input (){
    string a;
    cin >> a;
    int* b = new int[200];
    for(int i=0;i<a.length();i++){
        b[i]=a[i]-'0';
    }
    if(a.length()>maxLength) maxLength = a.length();
    return b;
}

int main(){
    int *a1 = input();
    int *a2 = input();
    int out[520] = {0};
    int tmp=0,rel=0;
    int r=0;
    cout << maxLength;
    
    for(int i=0;i<;i++){
        int sum = a1[maxLength-i-1] + a2[maxLength-i-1];
        rel = sum%10;
        out[i]+=rel;
        tmp = sum/10;
        out[i+1]+=tmp;
        if(tmp>0 && i==maxLength-1) r=1;
    }
    if(r==1) maxLength++;
    for(int i=maxLength-1;i>=0;i--){
		cout << out[i];
	}
}
